﻿function getRoot(dom) {
    if (dom.location.pathname == "/pages/defaultMain.aspx") {
        return dom;
    }
    else {
        return getRoot(dom.parent); 
    }
}
var mainDom = getRoot(this);
var winers = mainDom.winers;
var winer;
for (var i = 0; i < winers.length; i++) {
    if (this.document.location == winers[i].GetIframeUrl()) {
        winer = winers[i];
        break;
    }
}

if (!winer) {
    winer = new mainDom.Winer(null, null, null);
}
